package cn.tedu.cgb2110boot01;

public class Test1 {
    public static void main(String[] args) {
        String s ="http://localhost:8080/user/userServlet?user=jack&pwd=123";
        String[] ss1 = s.split("\\?")[1].split("&");//等同于下面三句语句

        String[] out1 = s.split("\\?");
//        System.out.println(out1[1]);
        String out2 = out1[1];
        String[] out3 = out2.split("&");

        for (String str: out3) {
            String[] s1 = str.split("=");
            String input = s1[1];
            System.out.println(input);
        }
    }
}
